﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using CFM.DTO;
using CFM.DAL;

namespace CFM.API
{
    class RoleAPI
    {
        private DataHelper _helper = null;
        public RoleAPI()
        {
            _helper = new DataHelper();  
        }

        public List<Role> GetAll()
        {
            string sql = "select * from Role";
            SqlDataReader dr = _helper.ExcuteDataReader(sql, null);
            return _helper.MapDataReaderToObject<Role>(dr);
        }
    }
}
